<!--
 * @Description: 
 * @Author: charles
 * @Date: 2021-05-05 22:02:56
 * @LastEditors: charles
 * @LastEditTime: 2022-01-04 13:12:25
-->
<template>
  <!--1. 容器 -->
  <div ref="left1_container" id="container" style="height: 95%"></div>
</template>

<script>
import {Line} from '@antv/g2plot';

export default {
  data (){
    return{
       dataArr:[{ year: '1', value: 5 },
                { year: '2', value: 4.5 },
                { year: '3', value: 5.5 },
                { year: '4', value: 5 },
                { year: '5', value: 4 },
                { year: '6', value: 2.5 },
                { year: '7', value: 1 },]
     }
  },
created(){

  },
mounted(){
this.initChart()
},
methods:{
  
   initChart(){
     const line = new Line(this.$refs.left1_container,{
       data:this.dataArr,
       xField:'year',
       yField:'value',
       });

  line.render();
}
}
}
</script>

<style scoped>

</style>